package com.example.demo2_review.design_pattern.structural_patterns.decorator_pattern;

/**
 * @Author zwp14
 * @create 2024/6/25 0:25
 * @description 抽象类-装饰模拟器
 */
public abstract class ShapeDecorator implements Shape{

    /**
     * 绘画者
     */
    protected Shape decoratedShape;

    /**
     * 下面的draw方法将由传递进来绘画者进行绘画
     * @param decoratedShape 绘画
     */
    public ShapeDecorator(Shape decoratedShape) {
        this.decoratedShape = decoratedShape;
    }

    @Override
    public void draw() {
        decoratedShape.draw();
    }
}
